package fun.tan90.study.rest;

import fun.tan90.study.domain.User;
import jakarta.annotation.Resource;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description TODO
 * company 铁人科技
 *
 * @author 陈浩杰
 * @date 2024/3/18 19:43
 */
@RestController
public class DemoController {

    @Resource
    StringRedisTemplate stringRedisTemplate;

    @GetMapping
    public User index() {
        stringRedisTemplate.opsForValue().set("hello", "world");
        return User.builder().id("1").name("陈浩杰").age(34).build();
    }

}

